//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    public class FillEffect : Effect
    {
        private FillProperties properties;

        public FillProperties Properties
        {
            get { return properties; }
            set { properties = value; }
        }

        internal override void ReadXmlCore(ReadContext context)
        {
            using (var c = context.Read("fill"))
            {
                Properties = FillProperties.ReadFillProperties(c);
            }
        }

        internal override void WriteXmlCore(WriteContext context)
        {
            using (WriteContext c = context.Write("fill"))
            {
                c.WriteElement(Properties);
            }
        }
    }
}